<template>
  <div class="all" style="height: 100%;width: 100%;overflow-x: auto;overflow-y: auto;">
    <a-row class="all-row" style="height:100%;width: 100%">
      <a-col  span="11" class="shu-ru-can-shu" style="height: 100%;">
        <div class="shu-ru-can-shu"  style="height: 100%;width: 98%;font-size: 0;box-shadow: 0px 2px 8px rgb(213,213,213);">
          <p style="width: 100%;height: 3.5%;background-color: #D7D7D7;font-family: Arial;font-style: normal;font-size: 16px;">输入参数</p>
          <div class="shu-ru-can-shu-left" style="height: 95%;width: 55%;display: inline-block;vertical-align: top;">
            <div style="height: 4%;width: 100%;font-size:16px;">齿轮基本参数</div>

            <div class="ji-ben-can-shu" style="margin-left:2%;width: 96%;height: 62%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <div class="ji-ben-can-shu-all" style="height: 100%;width:100%;display: flex;">
                <div class="ji-ben-can-shu-text" style="height: 100%;width: 42%;display: flex;">
                  <ul class="ji-ben-can-shu-li-1" style="height: 100%;width: 100%;">
                    <li></li>
                    <li >法向模数(mm)</li>
                    <li >齿数</li>
                    <li>法向压力角(°)</li>
                    <li>螺旋角(°)</li>
                    <li>中心距(mm)</li>
                    <li>法向变位系数</li>
                    <li>齿宽（mm）</li>
                    <li>齿顶高系数</li>
                    <li>顶隙系数</li>
                    <li>齿向倒角高度(直径)(mm)</li>
                    <li>齿顶削减量(直径)(mm)</li>
                    <li>齿面粗糙度Ra(um)</li>
                    <li>轮缘厚度系数</li>
                    <li>辐板厚度(mm)</li>
                    <li>齿顶修缘量(um)</li>
                    <li>齿轮类型</li>
                    <li>主动轮</li>
                    <li>精度等级</li>
                    <li>齿面跑合状况</li>
                  </ul>
                </div>
                <div style="height: 100%;width: 29%;display: flex;">
                  <ul class="ji-ben-can-shu-li-2" style="height: 100%;width: 100%;">
                    <li>小轮</li>
                    <li style="width: 200%"><input v-model="params_58.normal_module" value="6.6" /></li>
                    <li ><input v-model="params_58.z_p" value="12000"  /></li>
                    <li style="width: 200%"><input v-model="params_58.press_angle" value="9947" /></li>
                    <li style="width: 200%"><input v-model="params_58.helix_angle" value="12000" /></li>
                    <li style="width: 200%"><input v-model="params_58.work_center" value="9947" /></li>
                    <li><input v-model="params_58.normal_modi_factor_p"  value="0"  /></li>
                    <li style="width: 200%"><input v-model="params_58.face" value="110" /></li>
                    <li> <input v-model="params_58.ad_factor_p"  value="1"  /></li>
                    <li><input v-model="params_58.tip_factor_p"  value="0.25"  /></li>
                    <li><input v-model="params_58.chamfer_dia_p"  value="0"  /></li>
                    <li> <input v-model="params_58.ad_cut_dia_p" value="0"  /></li>
                    <li><input v-model="params_58.Ra_flank_p"  value="1.6"  /></li>
                    <li><input v-model="params_58.SR_p"  value="3.5"  /></li>
                    <li> <input v-model="params_58.web_thickness_p" value="110"  /></li>
                    <li> <input v-model="params_58.Ca1"  value="0"  /></li>
                    <li>
                      <select v-model="params_58.gear_type" >
                        <option value="1">外啮合</option>
                        <option value="2">内啮合</option>
                      </select>
                    </li>
                    <li>
                      <select v-model="params_58.driver" >
                        <option value="1">小轮</option>
                        <option value="2">大轮</option>
                      </select>
                    </li>
                    <li>
                      <select v-model="params_58.quality_grade" >
                        <option value="6">6级及以上</option>
                        <option value="7">6级以下</option>
                      </select>
                    </li>
                    <li>
                      <select v-model="params_58.profile_modification" >
                        <option value="1">充分跑合</option>
                        <option value="2">新加工</option>
                      </select>
                    </li>
                  </ul>
                </div>
                <div style="height: 100%;width: 29%;display: flex;">
                  <ul class="ji-ben-can-shu-li-2" style="height: 100%;width: 100%;">
                    <li>大轮</li>
                    <li ></li>
                    <li> <input v-model="params_58.z_w"  value="12000" /></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li><div> {{ ans.normal_modi_factor_w}}</div></li>
                    <li></li>
                    <li><input v-model="params_58.ad_factor_w" value="1" /></li>
                    <li><input v-model="params_58.tip_factor_w" value="0.25" /></li>
                    <li><input v-model="params_58.chamfer_dia_w"  value="0" /></li>
                    <li><input v-model="params_58.ad_cut_dia_w"  value="0" /></li>
                    <li> <input v-model="params_58.Ra_flank_w" value="1.6" /></li>
                    <li><input v-model="params_58.SR_w" value="3.5" /></li>
                    <li> <input v-model="params_58.web_thickness_w"  value="110" /></li>
                    <li> <input v-model="params_58.Ca2" value="0" /></li>
                  </ul>
                </div>
              </div>

            </div>
            <div style="height: 4%;width: 100%;font-size:16px;">齿轮材料参数</div>
            <div class="cai-liao-can-shu" style="margin-left: 2%;width: 96%;height: 25%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <div class="cai-liao-can-shu-all" style="height: 100%;width:100%;display: flex;">
                <div class="cai-liao-can-shu-text" style="height: 100%;width: 42%;display: flex;">
                  <ul class="cai-liao-can-shu-li-1" style="width: 100%;height: 100%">
                    <li></li>
                    <li>弹性模量(MPa)</li>
                    <li>泊松比</li>
                    <li>热导率(N/(s.K))</li>
                    <li>单位体积比热容(N/(mm2.K))</li>
                  </ul>
                </div>
                <div style="height: 100%;width: 29%;display: flex;">
                  <ul class="cai-liao-can-shu-li-2" style="width: 100%;height: 100%">
                    <li>小轮</li>
                    <li><input v-model="params_58.E_p" value="6.6" /></li>
                    <li><input v-model="params_58.possion_p " value="12000" /></li>
                    <li><input v-model="params_58.lambda_M1"  value="6.6" /></li>
                    <li><input v-model="params_58.c_v1" value="12000" /></li>

                  </ul>
                </div>
                <div style="height: 100%;width: 29%;display: flex;">
                  <ul class="cai-liao-can-shu-li-2" style="width: 100%;height: 100%">
                    <li>大轮</li>
                    <li><input v-model="params_58.E_w"  value="12000"/></li>
                    <li><input v-model="params_58.possion_w" value="12000"/></li>
                    <li><input v-model="params_58.lambda_M2"  value="12000"/></li>
                    <li><input v-model="params_58.c_v2" value="12000"/></li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
          <div class="shu-ru-can-shu-right" style="height: 95%;width: 45%;display: inline-block;">
            <div style="height: 4%;width: 100%;font-size:16px;">载荷参数</div>
            <div style="height: 32%;width: 96%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <div class="cai-liao-can-shu-all" style="height: 100%;width:100%;display: flex;">
                <div class="cai-liao-can-shu-text" style="width: 65%;height: 100%">
                  <ul class="cai-liao-can-shu-li-1" style="height: 100%;width: 100%">
                    <li >小轮扭矩(Nmm)</li>
                    <li >小轮转速(r/min)</li>
                    <li >使用系数</li>
                    <li >动载系数</li>
                    <li >胶合(接触)齿向载荷分布系数</li>
                    <li >胶合(接触)齿间载荷分布系数</li>
                  </ul>
                </div>
                <div style="width: 35%;;height: 100%">
                  <ul class="cai-liao-can-shu-li-2" style="height: 100%;width: 100%">
                    <li ><input v-model="params_58.torque_p" value="121"  /></li>
                    <li ><input v-model="params_58.speed_p"  value="28"  /></li>
                    <li ><input v-model="params_58.K_A"  value="1.5" /></li>
                    <li ><input v-model="params_58.K_V"  value="133.5" /></li>
                    <li ><input v-model="params_58.K_Hbeta"  value="305"  /></li>
                    <li ><input v-model="params_58.K_Halpha"  value="2" /></li>
                  </ul>
                </div>
              </div>
            </div>
            <div style="height: 4%;width: 100%;font-size:16px;">润滑与其他参数</div>
            <div style="height: 55%;width: 96%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <div class="qi-ta-can-shu-all" style="height: 100%;width:100%;display: flex;">
                <div class="qi-ta-can-shu-text" style="width: 55%;height: 100%">
                  <ul class="qi-ta-can-shu-li-1" style="height: 100%;width: 100%">
                    <li>润滑方式</li>
                    <li >润滑剂类型</li>
                    <li >润滑剂牌号</li>
                    <li >40℃运动粘度(mm2/s)</li>
                    <li >100℃运动粘度(mm2/s)</li>
                    <li >润滑剂密度 (kg/m3)</li>
                    <li >油池/喷油温度(℃)</li>
                    <li >焊合系数</li>
                    <li >计算点数</li>
                    <li  >轮齿本体温度计算方法</li>
                    <li  v-show="params_58.ThetaM_input==2" >轮齿本体温度(°C)</li>
                    <li>胶合温度计算方法</li>
                    <li v-show="params_58.ThetaS_calculation==1" >FZG实验载荷级</li>
                    <li v-show="params_58.ThetaS_calculation==2">实验齿轮本体温度(°C)</li>
                    <li v-show="params_58.ThetaS_calculation==2">实验齿轮最大闪温(K)</li>
                  </ul>
                </div>
                <div style="width: 45%;height: 100%">
                  <ul class="qi-ta-can-shu-li-2" style="height: 100%;width: 100%">
                    <li >
                      <select v-model="params_58.lubrication_type" >
                        <option value="1">喷油润滑</option>
                        <option value="2">油浴润滑</option>
                        <option value="3">齿轮浸没在油中</option>
                      </select>
                    </li>
                    <li >
                      <select v-model="params_58.lubricant">
                        <option value="1">矿物油</option>
                        <option value="2">聚alpha烯族烃</option>
                        <option value="3">非水溶性聚乙二醇</option>
                        <option value="4">水溶性聚乙二醇</option>
                        <option value="5">牵引液体</option>
                        <option value="6">磷酸酯</option>
                      </select>
                    </li>
                    <li >
                      <select v-model="params_58.lubricant_ISOVG" >
                        <option value="1">自定义</option>
                        <option value="22">22</option>
                        <option value="32">32</option>
                        <option value="46">46</option>
                        <option value="48">48</option>
                        <option value="100">100</option>
                        <option value="150">150</option>
                        <option value="220">220</option>
                        <option value="320">320</option>
                        <option value="460">460</option>
                        <option value="480">480</option>
                        <option value="1000">1000</option>
                        <option value="1500">1500</option>
                      </select>
                    </li>
                    <li >
                      <input v-show="params_58.lubricant_ISOVG==1" value="121"  />
                      <div v-show="params_58.lubricant_ISOVG!=1">{{ans.v_40}}</div>
                    </li>
                    <li >
                      <input v-show="params_58.lubricant_ISOVG==1" value="28"  />
                      <div v-show="params_58.lubricant_ISOVG!=1">{{ans.v_100}}</div>
                    </li>
                    <li ><input v-model="params_58.oil_density" value="1.5" /></li>
                    <li ><input v-model="params_58.Theta_oil" value="133.5"  /></li>
                    <li ><input v-model="params_58.X_W" value="133.5"  /></li>
                    <li ><input v-model="params_58.nop" value="2"  /></li>
                    <li >
                      <select v-model="params_58.ThetaM_input" id="s1id"  >
                        <option id="s2id" value="1">程序计算</option>
                        <option id="s3id" value="2">用户输入</option>
                      </select>
                    </li>
                    <li v-show="params_58.ThetaM_input==2" ><input value="80"   /></li>
                    <li >
                      <select v-model="params_58.ThetaS_calculation" id="s_2"  >
                        <option value="1">基于润滑油FZG实验A8.3/90</option>
                        <option value="2">基于试验齿轮数据</option>
                      </select>
                    </li>
                    <li v-show="params_58.ThetaS_calculation==1"  ><input v-model="params_58.FZG" value="12" /></li>
                    <li v-show="params_58.ThetaS_calculation==2" ><input v-model="params_58.Theta_MT" value="12" /></li>
                    <li v-show="params_58.ThetaS_calculation==2" ><input v-model="params_58.Theta_flmaxT" value="12"  /></li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
        </div>
      </a-col>

      <a-col span="13" class="all-col2" style="height: 100%;">
        <div style="height: 100%;width: 100%;box-shadow: 0px 2px 8px rgb(213,213,213);">
          <p style="width: 100%;height: 3.5%;background-color: #D7D7D7;font-family: Arial;font-style: normal;font-size: 16px;">输入参数</p>
          <div style="height: 95%;width: 35%;display: inline-block;vertical-align: top;">
            <div style="height: 4%;width: 100%;font-size: 16px">计算结果汇总</div>
            <div class="hui-zong" style="height: 75%;width: 96%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <div class="hui-zong-all" style="height: 100%;width: 100%;display: flex;">
                <div class="hui-zong-text" style="width: 60%;height: 100%">
                  <ul class="hui-zong-li-1"  style="width: 100%;height: 100%">
                    <li>轮齿本体温度(℃)</li>
                    <li  >最大闪温(℃)</li>
                    <li  >最大接触温度(℃)</li>
                    <li  >润滑系数</li>
                    <li  >粗糙度系数</li>
                    <li  >平均摩擦系数</li>
                    <li  >单位轮齿载荷(N/mm)</li>
                    <li  >热闪系数（最大点）</li>
                    <li  >压力角系数</li>
                    <li  >几何系数（最大点）</li>
                    <li  >啮入系数（最大点）</li>
                    <li  >载荷分担系数（最大点）</li>
                    <li  >胶合温度(℃)</li>
                    <li  >胶合安全系数</li>
                  </ul>
                </div>
                <div style="width: 40%;height: 100%">
                  <ul class="hui-zong-li-2"  style="width:100%;height: 100%">
                    <li> {{ ans.theta_M}}</li>
                    <li>{{ans.theta_flmax}}</li>
                    <li>{{ans.theta_Bmax}}</li>
                    <li>{{ans.x_L}}</li>
                    <li>{{ans.x_R}}</li>
                    <li>{{ans.u_m}}</li>
                    <li>{{ans.specific_load}}</li>
                    <li> {{ ans.x_M_max}}</li>
                    <li>{{ans.x_alpha_beta}}</li>
                    <li> {{ ans.x_G_max}}</li>
                    <li> {{ans.x_J_max}}</li>
                    <li> {{ans.x_Gamma_max}}</li>
                    <li>{{ans.theta_S}}</li>
                    <li>{{ans.s_B}}</li>

                  </ul>
                </div>
              </div>

            </div>
            <button style="height: 5%;width: 30%;margin-left: 30%;margin-top: 5%" @click="tclick">计算</button>

          </div>
          <div style="height: 95%;width: 65%;display: inline-block;vertical-align: top;">
            <div style="height: 4%;width: 100%;font-size: 16px">中间结果</div>
            <div class="jie-guo" style="height: 90%;width: 98%;box-shadow: 0px 2px 8px rgb(213,213,213);">
              <table class="jie-guo-table" style="border-radius:3px; display:inline-block; height: 100%;width: 100%">
                <tr style="background-color: #EAEAEA;font-size: 14px">
                  <th  >序号</th>
                  <th>参数</th>
                  <th>热闪系数</th>
                  <th>啮入系数</th>
                  <th>几何系数</th>
                  <th>载荷分担</th>
                  <th>闪温(°C)</th>
                </tr>
                <tr v-for="(item,index) in ans.zh" :key="index" >
                  <td>{{item[0]}}</td>
                  <td>{{item[1]}}</td>
                  <td>{{item[2]}}</td>
                  <td>{{item[3]}}</td>
                  <td>{{item[4]}}</td>
                  <td>{{item[5]}}</td>
                  <td>{{item[5]}}</td>
                </tr>
              </table>
            </div>

          </div>

        </div>
      </a-col>
    </a-row>

  </div>

</template>

<script>

import {gear_flash_temperature_a} from "@/api/file";

export default {
  created() {
    document.title = '齿轮胶合计算（闪温）'
    this.$store.state.file.key = 15 //设置key为自己的页面编号
  },
  data() {
    return {
      params_58:this.$store.state.file.dataList[15],
      ans: {
        normal_modi_factor_w: "Text",
        v_40: "Text",
        v_100: "Text",
        theta_M: "Text",
        theta_flmax: "Text",
        theta_Bmax: "Text",
        x_L: "Text",
        x_R: "Text",
        u_m: "Text",
        specific_load: "Text",
        x_M_max: "Text",
        x_alpha_beta: "Text",
        x_G_max: "Text",
        x_J_max: "Text",
        x_Gamma_max: "Text",
        theta_S: "Text",
        s_B: "Text",
        // axial_contact_ratio:"Text",
        // index:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // Gamma:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // X_M:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // X_J:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // X_G:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // X_Gamma:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        // Theta_fl:['','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''],
        zh: ['', '', '', '', '', '', '']['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
      },
      // ans1:{}
    };
  },
  methods: {
    tclick() {
      // eslint-disable-next-line no-undef
      console.log("kaishijisuna")
      console.log(this.params_58)
      gear_flash_temperature_a(this.params_58)
          .then(res => {
            console.log("kaishijisunaasdasdasdasd")
            console.log(res);
            this.ans = res;
          })
          .catch(error => {
            console.log(error);
            console.log("error");
          });
    },
  }
}
</script>

<style scoped>
.ji-ben-can-shu-li-1 li{
  height: 5%;
  width: 100%;
  text-align: right;
  font-size: 14px;
}
.ji-ben-can-shu-li-2 li{
  height: 5%;
  width: 100%;
  text-align: center;
  font-size: 14px;
}
.ji-ben-can-shu-li-2 input{
  height: 80%;
  width: 80%;
  text-align: center;

}
.ji-ben-can-shu-li-2 select{
  height: 80%;
  width: 120%;
  text-align: right;

}
.cai-liao-can-shu-li-1 li{
  width: 100%;
  height: 16%;
  text-align: right;
  font-size: 14px;
}
.cai-liao-can-shu-li-2 li{
  width: 100%;
  height: 16%;
  text-align: center;
  font-size: 14px;
}
.cai-liao-can-shu-li-2 input{
  width: 70%;
  height: 70%;
  text-align: center;
}
.qi-ta-can-shu-li-1 li{
  width: 100%;
  height: 7%;
  text-align: right;
  font-size: 14px;

}
.qi-ta-can-shu-li-2 li{
  width: 100%;
  height: 7%;
  text-align: center;
  font-size: 14px;
}
.qi-ta-can-shu-li-2 input,select{
  width: 70%;
  height: 70%;
  text-align: center;
}
.hui-zong-li-1 li{
  width: 100%;
  height: 6.5%;
  text-align: right;
  font-size: 14px;
}
.hui-zong-li-2 li{
  width: 100%;
  height: 6.5%;
  text-align: center;
  font-size: 14px;
}
.jie-guo-table tr{
  height: 3%;
  width: 100%;
  text-align: center;
}
.jie-guo-table  th,td{

  height: 100%;
  width: 12%;
  text-align: center;
}
</style>